#include "fx.h"
#include <QGraphicsEllipseItem>
#include <QTimeLine>
#include <QGraphicsScene>
#include <QGraphicsItemAnimation>
#include "QtMapWidget.h"
#include "QtWorld.h"

fx::fx(QWidget *parent, Qt::WFlags flags): QMainWindow(parent, flags)
{
	ui.setupUi(this);

     //QGraphicsScene *scene = new QGraphicsScene();
     //scene->setSceneRect(0, 0, 250, 250);
	 //QtMapWidget *w = new QtMapWidget();
     //scene->addItem(w);

	 //ui.graphicsView->setScene(scene);
	 // CODE SHOULD NOT BE HERE
	 ui.graphicsView->setScene(new QtWorld());
	 ui.graphicsView->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
	 //w->Setup();

	/*
     QGraphicsItem *ball = new QGraphicsEllipseItem(0, 0, 20, 20);

     QTimeLine *timer = new QTimeLine(5000);
     timer->setFrameRange(0, 600);

     QGraphicsItemAnimation *animation = new QGraphicsItemAnimation;
     animation->setItem(ball);
     animation->setTimeLine(timer);

	 animation->setPosAt(0, QPointF(0, 0));
	 animation->setPosAt(1, QPointF(200, 200));

     QGraphicsScene *scene = new QGraphicsScene();
     scene->setSceneRect(0, 0, 250, 250);
     scene->addItem(ball);

	 ui.graphicsView->setScene(scene);
     ui.graphicsView->show();

     timer->start();
	 */
}

fx::~fx()
{

}
